import pao = require('../pao/public');
import paoClient = require('../pao/client/client');
import navbarMainForm = require('../pao/client/mainForm/navbarMainForm');

/** 应用程序配置 */
export let defaultObject = new paoClient.clientApplication();

let mainForm = new navbarMainForm.navbarMainForm();

syncRequire('./pao/client/controls');
mainForm.navPages = [
    {
        $type: "pao.client.tabPage",
        title: "首页",
        icon: "home",
        iconClass: "glyphicon glyphicon-home",
        view: new pao.lazyFactory("config/homeViewConfig", "defaultObject")
    },
    {
        $type: "pao.client.tabPage",
        title: "贷款",
        icon: "usd",
        iconClass: "glyphicon glyphicon-usd",
        view: new pao.lazyFactory("config/testViewConfig", "defaultObject")
    },
    {
        $type: "pao.client.tabPage",
        title: "我",
        icon: "user",
        iconClass: "glyphicon glyphicon-user",
        view: new pao.lazyFactory("config/aboutViewConfig", "defaultObject")
    }
];
pao.fetchAddonProtoType(mainForm);
defaultObject.mainForm = mainForm;

defaultObject.serverLogger = new paoClient.remoteFactory(pao.baseLogger, "remoteCall", "fileLogService");